import './index.css'
import PropTypes from "prop-types"
function UserGreet(props){
    const welocomeMessage = <h2 className='welcome-message'> welcom {props.userName}</h2>
    const loginPrompt = <h2 className='login-message'> please log in continue </h2>
        return (
            props.isLogin? welocomeMessage:loginPrompt         
        ) 
}
UserGreet.prototype = {
    isLogin:PropTypes.bool,
    userName:PropTypes.string
}

UserGreet.defaultProps = {
    isLogin:false,
    userName:'Guest'
}
export default UserGreet;